import request from '@/utils/request';

// 获取所有文章
export function getArticle(query) {
  return request({
    url: '/article/list',
    method: 'get',
    params: query,
  });
}

// 获取所有标签
export function getTags() {
  return request({
    url: '/tags/list',
    method: 'get',
  });
}

// 获取标签详情
export function getTagDetail(query) {
  return request({
    url: '/tags/detail',
    method: 'get',
    params: query,
  });
}

// 获取在作品集合
export function getCollectionWorks(query) {
  return request({
    url: '/collectionWorks/list',
    method: 'get',
    params: query,
  });
}
// 获取在作品集合
export function getStudyNotes(query) {
  return request({
    url: '/studyNotes/list',
    method: 'get',
    params: query,
  });
}

// 获取在学习笔记
export function postArticleDetail(data) {
  return request({
    url: '/article/detail',
    method: 'post',
    data,
  });
}

// 摸鱼列表
export function getFishList() {
  return request({
    url: '/fish/list',
    method: 'get',
  });
}

// 工具列表
export function getToolsList() {
  return request({
    url: '/tools/list',
    method: 'get',
  });
}

// 工具详情
export function postToolDetail(data) {
  return request({
    url: '/tool/detail',
    method: 'post',
    data,
  });
}
